package com.lc.aiagent.demo.invoke;


import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.community.model.dashscope.WanxImageModel;
import dev.langchain4j.data.image.Image;
import dev.langchain4j.model.output.Response;

/**
 * 功能：
 * 作者：lc
 * 日期：2025/4/27 0:30
 */
public class LangChainAiInvoke {
    public static void main(String[] args) {
        QwenChatModel qwenChatModel = QwenChatModel.builder()
                .apiKey(TestApiKey.API_KEY)
                .modelName("qwen-max")
                .build();
        String chat = qwenChatModel.chat("你好呀，你的名字是什么！");
        System.out.println(chat);
        WanxImageModel wanxImageModel = WanxImageModel.builder()
                .modelName("wanx2.1-t2i-plus")
                .apiKey(TestApiKey.API_KEY)
                .build();
        Response<Image> response = wanxImageModel.generate("桃花 写实 高清 ");
        System.out.println(response.content().url());

    }
}
